CREATE TABLE test(
  id TEXT
);

SELECT * FROM test ORDER BY id NULLS LAST;
SELECT * FROM test ORDER BY id NULLS FIRST;

UPDATE test SET id = 'id' ORDER BY id NULLS LAST LIMIT 1;
UPDATE test SET id = 'id' ORDER BY id NULLS FIRST LIMIT 1;

DELETE FROM test ORDER BY id NULLS LAST LIMIT 1;
DELETE FROM test ORDER BY id NULLS FIRST LIMIT 1;


